#include <stdio.h>
int main()
{
    int n, m;
    double t = 0.0;
    double sum = 0.0;
    double h = 0.0;
    scanf_s("%d %d", &n, &m);

    if (m == 1)
    {
        sum = 1.0 * n;
        h = 1.0 / 4 * n;
    }
    else
    {
        h = 1 / 4.00 * n; sum = n * 1.00; t = n;
        for (int i = 1; i < m; i++)
        {

            t /= 4.00;
            sum += 2.00 * t;
            h /= 4.00;

        }
    }
    printf("%.2f\n", sum);
    printf("%.2f\n", h);
    return 0;
}
